<template>
  <h3>子组件1</h3>
</template>

<script setup>
  import { onUnmounted } from 'vue';
  import emitter from '../utils/emitter'

  emitter.on('son-get-data', (value) => {
    console.log('son-get-data---', value)
  })

  onUnmounted(() => {
    emitter.off('son-get-data')
  })
</script>

<style>
</style>